package sifeap.pl.managedbean.eventos;

import java.util.List;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import sifeap.bl.ejb.eventos.EventoBLLocal;
import sifeap.entities.eventos.Evento;

@ManagedBean(name="listaEventosManagedBean")
@SessionScoped
public class ListaEventosManagedBean {
	private List<Evento> listaEventos;
	
	@EJB
	private EventoBLLocal eventoBL;

	public List<Evento> getListaEventos() {
		try {
			listaEventos = eventoBL.buscarEventosVigentes();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return listaEventos;
	}	
}
